From 524a3fa6021ee54db416503520aea65ef0e2c3a0 Mon Sep 17 00:00:00 2001 From: Iceyer Date: Tue, 16 Jan 2018 09:38:03 +0800 Subject: [PATCH] fix: awk script failed Change-Id: Ib5e731eb6a87b75c1e88c75065502ea175f734e5 --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 309449c..fc10b2f 100755 --- a/debian/rules +++ b/debian/rules @@ -9,7 +9,7 @@ export _VER=$(shell if [ ! -f .git/config ];then dpkg-parsechangelog -ldebian/ch export _MAJ_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[1]) == 0) print 0; else print int(vs[1]);}') export _MIN_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[2]) == 0) print 0; else print int(vs[2]);}') export _PAT_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[3]) == 0) print 0; else print int(vs[3]);}') -export _BUILD_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[4]) != 0) print vs[4]; else { split(vs[3], pvs,"+r"); if (length(pvs[2]) != 0) print int(pvs[2]); else print 0;}}') +export _BUILD_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[4]) != 0) print vs[4]; else { split(vs[3], pvs,/\+r/); if (length(pvs[2]) != 0) print int(pvs[2]); else print 0;}}') VERSION ?= $(shell echo $$_VER|awk '{ if (length($$0)!=0) printf "%s.%s.%s.%s",${_MAJ_VER},${_MIN_VER},${_PAT_VER},${_BUILD_VER}; else printf ""; }') %: -- 2.30.2